package com.aistar.service.impl;


import com.aistar.mapper.RewardMapper;
import com.aistar.pojo.Reward;
import com.aistar.pojo.RewardExample;
import com.aistar.service.RewardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class RewardServiceImpl implements RewardService {

    @Autowired
    private RewardMapper rewardMapper;
    @Override
    public List<Reward> getbyuserid(int id) {
        RewardExample example = new RewardExample();
        RewardExample.Criteria criteria = example.createCriteria();
        criteria.andRewardOtherIdEqualTo(id);
        List<Reward> rewardList =rewardMapper.selectByExample(example) ;
        return rewardList;
    }
}
